<template>
	<!-- 祭拜记录 -->
	<view class="worship">
		<view class="worship_detail">
			
			<view class="worship_list" v-for="(item,index) in worship_log_list" :key="index">
				<view class="worship_info">
					<view class="info_title">{{item.goods_name}}</view>
					<view class="info_num">
						<view class="num_money">{{item.intro}}</view>
						<view class="num_time">{{item.createtime}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="none_more">没有更多了</view>
	</view>
</template>

<script>
	import {worshipLog} from "@/utils/api/zupu.js";
	export default{
		data(){
			return{
				hall_id:'',//灵堂id
				hall_name:'',//灵堂主人名讳
				worship_log_list:[]//祭拜记录
			}
		},
		onLoad(option){
			this.hall_id = option.hall_id;
			this.hall_name = option.name;
			this.worshipLogfun();
			if(this.hall_name){
				uni.setNavigationBarTitle({
					title:`祭拜${this.hall_name}的记录`
				})
			}
			
		},
		methods:{
			worshipLogfun(){
				worshipLog({
					worship_hall_id:this.hall_id
				}).then((res)=>{
					if(res.code==1){
						this.worship_log_list = res.data.worshipLog;
					}else{
						this.$api.msg(res.msg)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	@import "./worship_record.scss"
</style>